/* $RCSFile: DocExplorer.aspx.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/AddonNice.EMailing/PageModules/DownloadSession/DocExplorer.aspx.cs $
 * $log$
 * Revision 23 2010/08/09 11:12:45  christian.surieux
 *   Added Log comment to all .ascx .aspx .master files
 * Revision 10 2010/08/09 10:13:18  christian.surieux
 *   Added Log comment to all cs files
 */

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using AddonNice.UI;
using AddonNice.Settings;
using AddonNice.UI.WebControls;
using AddonNice.Security;
using AddonNice.Configuration;
using AddonNice.Diagnostics;
using AddonNice.Helpers;

using Telerik.Web.UI;

using Trace2    =   System.Diagnostics.Trace;
using Path2     =   AddonNice.Settings.Path;

namespace AddonNice.PageModules.DownloadSession
{
    public partial class DocExplorer : StdAuxPage // could be derived from Page but we want to get the default site theme
    {
        // We do not want the default site masterPage
        public override bool SupportMasterPage
        {
            get
            {
                return false;
            }
        }
                
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if ( !IsPostBack )
            {
                string search4                                  =   Request.QueryString["search"];
                if ( search4 == "folders" )
                {
                    FileExplorer1.OnClientFileOpen              =   "OnClientGridDblClick2";
                    FileExplorer1.Configuration.SearchPatterns  =   new string[] { "*" };
                }
                else if ( search4 == "xml" )
                    FileExplorer1.Configuration.SearchPatterns  =   new string[] { "*.xml" };
                else if ( search4 == "csv" )
                    FileExplorer1.Configuration.SearchPatterns  =   new string[] { "*.csv" };

            }
        }
 		override protected void OnInit(EventArgs e)
		{
	        if (InstallTraceSwitch.Sw.TraceVerbose)
                Trace2.WriteLine("[V]DocExplorer OnInit BEG.",InstallTraceSwitch.Sw.Info);
			InitializeComponent();	
			base.OnInit(e);
	        if (InstallTraceSwitch.Sw.TraceVerbose)
                Trace2.WriteLine("[V]DocExplorer PreInit END.",InstallTraceSwitch.Sw.Info);
		}

		private void InitializeComponent() 
		{    
			Load						+=	new System.EventHandler(Page_Load);
 		}
   }
}
